package handler.v1;

public class HandlerV1Test {
    public static void main(String[] args) {
        Leave leave = new Leave();
        leave.setUserName("张三");
        leave.setLeaveDays(100);
        InitLeaveHandler initLeaveHandler = new InitLeaveHandler()
                .addRight(new HeadLeaveHandler())
                .addRight(new LeaderLeaveHandler())
                .addRight(new DeptLeaveHandler())
                .addRight(new BossLeaveHandler());
        initLeaveHandler.getAll(h -> System.out.println(h.handler));
        initLeaveHandler.execute(leave);

    }
}
